package com.hpp.service.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hpp.model.SysUser;
import com.hpp.persistence.SysUserMapper;
import com.hpp.service.IUserService;

@Service
public class UserServiceImpl implements IUserService{
	
	@Autowired
	SysUserMapper userMapper;

	@Override
	public SysUser getUserInfo(HashMap<String, Object> map) {
		return userMapper.getUserInfo(map);
	}

	@Override
	public List<SysUser> getUserList(HashMap<String, Object> map) {
		return userMapper.getUserList(map);
	}

	@Override
	public int updateSysUser(SysUser user) {
		return userMapper.updateByPrimaryKeySelective(user);
	}

	@Override
	public int addSysUser(SysUser user) {
		return userMapper.insertSelective(user);
	}

	@Override
	public int deleteSysUser(HashMap<String, Object> map) {
		return userMapper.deleteSysUser(map);
	}

	@Override
	public List<SysUser> checkUserInfo(String userName, String phone) {
		return userMapper.checkUserInfo(userName,phone);
	}

}
